import { createRouter, createWebHistory } from "vue-router"
import index from './components/index.vue'
import CreateArticle from './components/CreateArticle.vue'
import ListArticle from './components/ArticleList.vue'
import EditArticle from './components/EditArticle.vue'
const router = createRouter({
    history: createWebHistory(process.env.node),
    routes: [{
        path: '/',
        component: index,
        redirect: '/article/list',
        children: [{
            path: '/article/create',
            component: CreateArticle
        }, {
            path: '/article/list',
            component: ListArticle
        }, {
            path: '/article/edit/:id',
            component: EditArticle,
        }]
    }, ]
})
export default router